package com.stedu.mall.adminservice.mapper;

import com.stedu.mall.common.bean.Admin;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

public interface AdminMapper {
    //根据用户名查询
    Admin selectByUsername(String username);//要不没有,要不就只有一个
    //增加
    int insert(Admin admin);
    //根据分类id删除
    int delete(Integer id);
    //根据分类id修改
    int update(Admin admin);
    //根据条件查询
    List<Admin> selectByCondition(Admin condition);
    //根据id查询
    Admin selectById(Integer id);
    @MapKey("name")
    List<Map<String, Object>> selectTop5Dept();
    @MapKey("username")
    List<Map<String, Object>> selectUserOrder();
}
